/*
 * sound.h
 *
 *  Created on: Jun 16, 2012
 *      Author: bysse
 */

#ifndef SOUND_H_
#define SOUND_H_

#include <semaphore.h>
#include "sync.h"

class Sound {
public:
	Sound(Sync* sync);
	~Sound();

	void initialize();
	void start();
	void stop();

	void loop();

protected:
	volatile bool shutdown;
	sem_t startSemaphore;
	pthread_t thread;

	Sync* sync;
};

#endif /* SOUND_H_ */
